from pydantic import BaseModel, Field, ConfigDict
from datetime import datetime


class PhotoOutSchema(BaseModel):
    model_config = ConfigDict(from_attributes=True)

    id: int = Field(description="图片ID")
    name: str = Field(description="图片名称")
    href: str = Field(description="图片链接")
    mime: str = Field(description="MIME类型")
    size: str = Field(description="图片大小")
    ext: str = Field(description="文件扩展名")
    create_time: datetime = Field(description="创建时间")
